<template>
  <el-container style="height: 500px; border: 1px solid #eee">
    <el-aside width="200px" style="background-color: rgb(255,255,255)">
      <el-image :src='ptp' style="width: 100%"></el-image>
      <el-menu> <!--:default-openeds="['1', '3']"-->
        <router-link to="das"><el-dropdown-item>&nbsp;<i class="el-icon-odometer"></i> 仪表盘</el-dropdown-item></router-link>
        <el-submenu index="1">
          <template slot="title"><i class="el-icon-menu"></i>常用设置</template>
          <el-menu-item-group>
            <router-link to="teacher"><el-menu-item index="1-1">教师管理</el-menu-item></router-link>
            <router-link to="student"><el-menu-item index="1-2">学生管理</el-menu-item></router-link>
            <router-link to="notice"><el-menu-item index="1-3">公告管理</el-menu-item></router-link>
            <router-link to="sysConfig"><el-menu-item index="1-4">系统配置</el-menu-item></router-link>
            <router-link to="judSer"><el-menu-item index="1-5">判断服务器</el-menu-item></router-link>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="2">
          <template slot="title"><i class="el-icon-aim"></i>问题</template>
          <el-menu-item-group>
            <router-link to="proList"><el-menu-item index="2-1">问题列表</el-menu-item></router-link>
            <router-link to="add"><el-menu-item index="2-2">增加题目</el-menu-item></router-link>
            <router-link to="ies"><el-menu-item index="2-3">导入到处题目</el-menu-item></router-link>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="3">
          <template slot="title"><i class="el-icon-trophy"></i>比赛&练习</template>
          <el-menu-item-group>
            <router-link to="comList"><el-menu-item index="3-1">比赛列表</el-menu-item></router-link>
            <router-link to="creCom"><el-menu-item index="3-2">创建比赛</el-menu-item></router-link>
          </el-menu-item-group>
        </el-submenu>
        <el-submenu index="4">
          <template slot="title"><i class="el-icon-collection"></i>课程</template>
          <el-menu-item-group>
            <router-link to="couList"><el-menu-item index="4-1">课程列表</el-menu-item></router-link>
            <router-link to="creCou"><el-menu-item index="4-2">创建课程</el-menu-item></router-link>
          </el-menu-item-group>
        </el-submenu>
      </el-menu>
    </el-aside>
    <el-container style="height: 100vh">
      <el-header style="text-align: right;">
        <span style="line-height: 60px">
          <icon class="el-icon-search"></icon>
          <icon class="el-icon-share"></icon>
          <el-dropdown>
            <span>username<i class="el-icon-arrow-down el-icon--right"></i></span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>logout</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </span>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
      <el-footer align="center">
        <span style="line-height: 60px">Build Version:20210929bd</span>
      </el-footer>
    </el-container>
  </el-container>
</template>
<script>
import Dashboard from './often/Dashboard'
import Teacher from './often/teacher'
export default {
  data () {
    return {
      ptp: require('../assets/images/logo.png')
    }
  },
  components: {
    Dashboard,
    Teacher
  }
}
</script>
<style>
body{
  margin: 0px;
}
.el-header{
  background-color: #F9FAFC;
  color: #333;
}
.el-main ,.el-footer{
  background-color: #EDECEC;
  color: #333;
  text-align: center;
}
.el-aside {
  color: #333;
  height: 100vh;
}
</style>
